package com.zhoug.chart3.core;

import com.github.mikephil.charting.data.Entry;

import java.util.ArrayList;
import java.util.List;

import androidx.annotation.NonNull;

/**
 * @Author: zhoug
 * @Date: 2024-02-03
 * @Description:
 */
public class MPEntryList<T extends Entry> {
    private String[] keys;

    /**
     * 数据使用的坐标轴 默认左轴
     * {@link MPConstant.AxisDependency}
     */
    private @MPConstant.AxisDependency
    int axisDependency;

    private List<T> entries;

    public MPEntryList(@NonNull String[] keys, @MPConstant.AxisDependency int axisDependency) {
        this.keys = keys;
        this.axisDependency = axisDependency;
        entries = new ArrayList<>();
    }

    public String[] getKeys() {
        return keys;
    }

    public List<T> getEntries() {
        return entries;
    }

    public int getAxisDependency() {
        return axisDependency;
    }


    public void addEntry(T t) {
        entries.add(t);
    }

}
